# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=showmethekey
pkgver=1.12.0
pkgrel=0
pkgdesc="Show keys you typed on screen"
url="https://github.com/AlynxZhou/showmethekey"
arch="all !s390x !riscv64" # blocked by gtk4.0
license="Apache-2.0"
makedepends="
	eudev-dev
	gtk4.0-dev
	json-glib-dev
	libadwaita-dev
	libevdev-dev
	libinput-dev
	meson
	"
subpackages="$pkgname-lang $pkgname-doc"
source="https://github.com/AlynxZhou/showmethekey/archive/v$pkgver/showmethekey-$pkgver.tar.gz
	cli-exec-wrapper.patch
	showmethekey-cli-exec
	"
options="!check"  # no tests provided

build() {
	abuild-meson \
		--bindir /usr/libexec \
		. output
	meson compile -j ${JOBS:-0} -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	install -m755 "$srcdir"/showmethekey-cli-exec "$pkgdir"/usr/libexec/
}

sha512sums="
bba78950da4d7e834172cdb8e6daf58f4946e21cda349e7c94fefd86dca0416459bbaa130c10925d90c1239abb41f8b3d0641fb9b8e2d19824eec512d1ec3e84  showmethekey-1.12.0.tar.gz
fd4a7ee5867182ef7bfd8291dba7250be966a5ce5976dd6ed55d91ab4e51e6f58927bb57afe879955c0636b51fedabeb8d22e591d460ef1e695e2f50811d60cd  cli-exec-wrapper.patch
32cef0b0e175fb29c36284cb9c8a2952e2088688ebce34128e3760d6f9216346ccef73b3216fa982748038e31c25c6a59625966fa924557bbda7e3f66f09b23d  showmethekey-cli-exec
"
